package com.geodroid.euclidian;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;

import com.geodroid.common.kernel.geos.GeoElement;

public abstract class Drawable {

	public float screenX ; 
	public float screenY ; 
	protected float width ;
	protected float height ;
	protected long priority ;
	protected boolean hightLighted= false; 
	
	protected Paint paint=new Paint() ;
	protected GeoElement geo ;
	/**
	 * View in which this is drawn
	 */
	protected EuclidianView view; ;
	
	
	/**
	 * @param geo
	 */
	public Drawable(GeoElement geo,EuclidianView v) {
		super();
		this.geo = geo;
		this.view = v ;
	}

//	public abstract float distance(float x, float y) ;
	
//	public abstract boolean hits(float x, float y) ;
	public abstract boolean hits(RectF touchedArea) ;
	
	
	public abstract void draw(Canvas canvas) ; 
 
	public abstract void update() ; 
	
	public GeoElement getGeo() {
		return geo;
	}

	public void setGeo(GeoElement geo) {
		this.geo = geo;
	} 
	
	public void highLight() {
		this.hightLighted = true ;
	}

	public void unHighLight() {
		this.hightLighted = false ;
		
	}

	public GeoElement getGeoElement() {
		// TODO Auto-generated method stub
		return geo;
	}

	public abstract long getDrawingPriority() ;

	public abstract void translate(double ux, double uy) ;
	

}
